package com.party.admin.task;

import com.party.admin.biz.crowdfund.ProjectBizService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 众筹用时定时任务
 * Created by wei.li
 *
 * @date 2017/4/12 0012
 * @time 19:48
 */
@Component(value = "quartzCrowdfundUseTime")
public class QuartzCrowdfundUseTime {

    @Autowired
    private ProjectBizService projectBizService;

    private static Logger logger = LoggerFactory.getLogger(QuartzCrowdfundUseTime.class);

    /**
     * 更新众筹用时
     */
    public void updateZcUseTime(){
        logger.info("开始更新众筹用时");
        try {
            projectBizService.updateZcUseTime();
        }catch (Exception e){
            logger.error("更新众筹用时异常",e);
        }
    }
}
